﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.EnterpriseLibrary.Data;
using Microsoft.Practices.EnterpriseLibrary.Data.Sql;
using System.Data.Common;
using System.Data;


namespace DAL.BusinessDeal
{
    public class StSpDeleteRecordsDAL
    {
        public string SpDeleteRecords(object P_PK_ID, string P_TableName)
        {

            Database db = DatabaseFactory.CreateDatabase();
            DbCommand dbCommand = db.GetStoredProcCommand("SP_Delete_Records");
            //db.AddInParameter(dbCommand, "P_PK_ID", DbType.object, P_PK_ID);
            //db.AddInParameter(dbCommand, "P_TableName", DbType.String, P_TableName);
            //dbCommand.Parameters["ReturnValue "].Direction = ParameterDirection.Output;
            //db.ExecuteNonQuery(dbCommand);
            return dbCommand.Parameters["ReturnValue "].Value.ToString();

        }
    }
}
